package com.hl.bean;


/**
 * Created with IntelliJ IDEA.
 * Stay hungry, Stay foolish
 * User: elliott
 * Date: 2018-03-24
 * Time: 16:08
 * 通用处理返回结果
 */

public class GeneralResult {

    // 请求返回码
    private Integer status;

    // 提示信息
    private String message;

    // 错误信息
    private String errorMessage;

    // 返回的数据
    private Object data;

    public GeneralResult() {
    }

    /**
     * 操作失败 返回错误信息
     * @param status
     * @param message
     * @param errorMessage
     */
    public GeneralResult(Integer status, String message, String errorMessage) {
        this.status = status;
        this.message = message;
        this.errorMessage = errorMessage;
    }


    /**
     * 操作成功 无数据信息
     * @param status
     * @param message
     */
    public GeneralResult(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    /**
     * 操作成功 返回数据信息
     * @param status
     * @param message
     * @param data
     */
    public GeneralResult(Integer status, String message, Object data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
